<!DOCTYPE html>
<html>
    <head>
        <title>demo</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Monospace;
                background-color: #f0f0f0;
                margin: 0px;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <script src="https://cdn.bootcdn.net/ajax/libs/three.js/73/three.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/tween.js/0.11.0/Tween.min.js"></script>
		<script src="https://unpkg.com/three@0.73.1/examples/js/controls/TrackballControls.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/stats.js/10/Stats.min.js"></script>
        <script>

            var jsonstr = '[{"boxId":"94265920100R433","x":-26.400000,"y":-2.250000,"z":-543.250000,"width":179.000000,"height":222.500000,"length":105.500000,"weight":441.000000,"platform":"platform22","order":1,"material":"","type":1,"place":100},{"boxId":"94265910T001374","x":-55.900002,"y":-67.449997,"z":-440.500000,"width":100.000000,"height":92.099998,"length":120.000000,"weight":147.800003,"platform":"platform16","order":2,"material":"","type":1,"place":200},{"boxId":"94265910T001391","x":-55.900002,"y":17.250000,"z":-440.500000,"width":100.000000,"height":77.300003,"length":120.000000,"weight":117.199997,"platform":"platform16","order":3,"material":"","type":1,"place":200},{"boxId":"94265910T001372","x":50.099998,"y":-67.550003,"z":-444.500000,"width":92.000000,"height":91.900002,"length":92.000000,"weight":80.500000,"platform":"platform16","order":4,"material":"","type":1,"place":100},{"boxId":"94265910102L364","x":-60.900002,"y":-61.000000,"z":-335.500000,"width":110.000000,"height":105.000000,"length":110.000000,"weight":470.000000,"platform":"platform07","order":5,"material":"","type":1,"place":100},{"boxId":"94265910102L367","x":49.099998,"y":-61.000000,"z":-335.500000,"width":110.000000,"height":105.000000,"length":110.000000,"weight":467.000000,"platform":"platform07","order":6,"material":"","type":1,"place":100},{"boxId":"94265910102L343","x":-60.900002,"y":44.000000,"z":-335.500000,"width":110.000000,"height":105.000000,"length":110.000000,"weight":464.500000,"platform":"platform07","order":7,"material":"","type":1,"place":100},{"boxId":"94265910102L344","x":49.099998,"y":44.000000,"z":-335.500000,"width":110.000000,"height":105.000000,"length":110.000000,"weight":462.000000,"platform":"platform07","order":8,"material":"","type":1,"place":100},{"boxId":"94265910102L342","x":-60.900002,"y":-76.250000,"z":-225.500000,"width":110.000000,"height":74.500000,"length":110.000000,"weight":319.000000,"platform":"platform07","order":9,"material":"","type":1,"place":100},{"boxId":"94265910102L365","x":-60.900002,"y":-1.750000,"z":-225.500000,"width":110.000000,"height":74.500000,"length":110.000000,"weight":318.500000,"platform":"platform07","order":10,"material":"","type":1,"place":100},{"boxId":"94265910102L362","x":-60.900002,"y":72.750000,"z":-225.500000,"width":110.000000,"height":74.500000,"length":110.000000,"weight":318.000000,"platform":"platform07","order":11,"material":"","type":1,"place":100},{"boxId":"94265910102L363","x":49.099998,"y":-61.000000,"z":-225.500000,"width":110.000000,"height":105.000000,"length":110.000000,"weight":460.500000,"platform":"platform07","order":12,"material":"","type":1,"place":100},{"boxId":"94265910102L366","x":49.099998,"y":44.000000,"z":-225.500000,"width":110.000000,"height":105.000000,"length":110.000000,"weight":457.000000,"platform":"platform07","order":13,"material":"","type":1,"place":100},{"boxId":"94265920100R272","x":37.599998,"y":-48.500000,"z":-94.250000,"width":87.000000,"height":130.000000,"length":152.500000,"weight":197.500000,"platform":"platform07","order":14,"material":"","type":1,"place":100},{"boxId":"94265910102K115","x":24.350000,"y":38.500000,"z":-151.350006,"width":38.299999,"height":44.000000,"length":60.500000,"weight":6.100000,"platform":"platform09","order":15,"material":"","type":1,"place":200},{"boxId":"94265910102K479","x":24.350000,"y":82.500000,"z":-151.350006,"width":38.299999,"height":44.000000,"length":60.500000,"weight":5.200000,"platform":"platform09","order":16,"material":"","type":1,"place":200},{"boxId":"94265910102K153","x":30.600000,"y":53.000000,"z":-104.199997,"width":56.000000,"height":73.000000,"length":73.000000,"weight":172.300003,"platform":"platform09","order":17,"material":"","type":1,"place":200},{"boxId":"94265910102K154","x":30.600000,"y":53.000000,"z":-48.200001,"width":56.000000,"height":73.000000,"length":73.000000,"weight":171.699997,"platform":"platform09","order":18,"material":"","type":1,"place":200},{"boxId":"94265910102K397","x":54.099998,"y":-54.849998,"z":22.000000,"width":80.000000,"height":117.300003,"length":120.000000,"weight":173.000000,"platform":"platform09","order":19,"material":"","type":1,"place":200},{"boxId":"94265910102K146","x":54.099998,"y":52.849998,"z":22.000000,"width":80.000000,"height":98.099998,"length":120.000000,"weight":464.000000,"platform":"platform09","order":20,"material":"","type":1,"place":200},{"boxId":"94265910102K151","x":22.100000,"y":-77.000000,"z":98.500000,"width":56.000000,"height":73.000000,"length":73.000000,"weight":171.300003,"platform":"platform09","order":21,"material":"","type":1,"place":100},{"boxId":"94265910102K152","x":78.099998,"y":-77.000000,"z":98.500000,"width":56.000000,"height":73.000000,"length":73.000000,"weight":168.500000,"platform":"platform09","order":22,"material":"","type":1,"place":100},{"boxId":"94265910102K399","x":33.349998,"y":-3.750000,"z":82.250000,"width":40.500000,"height":73.500000,"length":78.500000,"weight":11.500000,"platform":"platform09","order":23,"material":"","type":1,"place":200},{"boxId":"94265910102K284","x":49.099998,"y":-69.349998,"z":190.000000,"width":110.000000,"height":88.300003,"length":110.000000,"weight":137.000000,"platform":"platform09","order":24,"material":"","type":1,"place":100},{"boxId":"94265910102K219","x":49.099998,"y":17.900000,"z":190.000000,"width":110.000000,"height":86.199997,"length":110.000000,"weight":163.000000,"platform":"platform09","order":25,"material":"","type":1,"place":100},{"boxId":"94265910102K116","x":32.599998,"y":85.400002,"z":173.500000,"width":77.000000,"height":48.799999,"length":77.000000,"weight":48.000000,"platform":"platform09","order":26,"material":"","type":1,"place":100},{"boxId":"94265910102K164","x":32.599998,"y":-62.650002,"z":283.500000,"width":77.000000,"height":101.699997,"length":77.000000,"weight":126.000000,"platform":"platform09","order":27,"material":"","type":1,"place":100},{"boxId":"94265910102K280","x":32.599998,"y":30.600000,"z":283.500000,"width":77.000000,"height":84.800003,"length":77.000000,"weight":138.500000,"platform":"platform09","order":28,"material":"","type":1,"place":100},{"boxId":"94265910102K145","x":32.599998,"y":-71.849998,"z":360.500000,"width":77.000000,"height":83.300003,"length":77.000000,"weight":68.000000,"platform":"platform09","order":29,"material":"","type":1,"place":100},{"boxId":"94265910102K097","x":32.599998,"y":6.850000,"z":360.500000,"width":77.000000,"height":74.099998,"length":77.000000,"weight":139.000000,"platform":"platform09","order":30,"material":"","type":1,"place":100},{"boxId":"94265910102K398","x":34.099998,"y":77.849998,"z":352.000000,"width":60.000000,"height":67.900002,"length":80.000000,"weight":61.500000,"platform":"platform09","order":31,"material":"","type":1,"place":200},{"boxId":"94265910102K163","x":32.599998,"y":-77.099998,"z":437.500000,"width":77.000000,"height":72.800003,"length":77.000000,"weight":88.500000,"platform":"platform09","order":32,"material":"","type":1,"place":100},{"boxId":"94265910102K234","x":32.599998,"y":-11.350000,"z":437.500000,"width":77.000000,"height":58.700001,"length":77.000000,"weight":27.000000,"platform":"platform09","order":33,"material":"","type":1,"place":100},{"boxId":"94265910102K138","x":32.599998,"y":42.349998,"z":437.500000,"width":77.000000,"height":48.700001,"length":77.000000,"weight":40.500000,"platform":"platform09","order":34,"material":"","type":1,"place":100},{"boxId":"94265910102K148","x":32.599998,"y":90.000000,"z":437.500000,"width":77.000000,"height":46.599998,"length":77.000000,"weight":123.500000,"platform":"platform09","order":35,"material":"","type":1,"place":100},{"boxId":"94265910102L796","x":45.750000,"y":-10.250000,"z":518.549988,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":36,"material":"","type":1,"place":100},{"boxId":"94265910102L795","x":-64.250000,"y":-10.250000,"z":-127.949997,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":37,"material":"","type":1,"place":100},{"boxId":"94265910102L794","x":-64.250000,"y":-10.250000,"z":-42.849998,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":38,"material":"","type":1,"place":100},{"boxId":"94265910102L793","x":-64.250000,"y":-10.250000,"z":42.250000,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":39,"material":"","type":1,"place":100},{"boxId":"94265910102L792","x":-64.250000,"y":-10.250000,"z":127.349998,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":40,"material":"","type":1,"place":100},{"boxId":"94265910102L791","x":-64.250000,"y":-10.250000,"z":212.449997,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":41,"material":"","type":1,"place":100},{"boxId":"94265910102L790","x":-64.250000,"y":-10.250000,"z":297.549988,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":42,"material":"","type":1,"place":100},{"boxId":"94265910102L789","x":-64.250000,"y":-10.250000,"z":382.649994,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":43,"material":"","type":1,"place":100},{"boxId":"94265910102L788","x":-64.250000,"y":-10.250000,"z":467.750000,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":44,"material":"","type":1,"place":100},{"boxId":"94265910102L787","x":-64.250000,"y":-10.250000,"z":552.849976,"width":103.300003,"height":206.500000,"length":85.099998,"weight":168.000000,"platform":"platform02","order":45,"material":"","type":1,"place":100}]';
			var jsonstr2 = '{"container_length":1192.000000,"container_width":231.800003,"container_height":227.000000,"container_max_load":23000.000000,"container_type_name":"40GP"}'
            var objectArray= JSON.parse(jsonstr);
			var truckJsonObj = JSON.parse(jsonstr2);
            var container, stats;
            var camera, controls, scene, projector, renderer;
            var objects = [], plane;
            var mouse = new THREE.Vector2(), offset = new THREE.Vector3(), INTERSECTED, SELECTED; 
            init();
            animate();
            function init() {
                container = document.createElement( 'div' );
                document.body.appendChild( container );
                camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
                camera.position.x = -600;
                camera.position.y = 400;
                camera.position.z = 1000;
                controls = new THREE.TrackballControls( camera );
                controls.rotateSpeed = 1.0;
                controls.zoomSpeed = 1.2;
                controls.panSpeed = 0.8;
                controls.noZoom = false;
                controls.noPan = true;
                controls.staticMoving = false;
                controls.dynamicDampingFactor = 0.3;
                scene = new THREE.Scene();
                var ambientLight = new THREE.AmbientLight( Math.random() *0xffffff );
                scene.add( ambientLight );
                var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
                directionalLight.position.set( 0, 1, 0 );
                scene.add( directionalLight );
                var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
                pointLight.position.set( 0, 0, -200 );
                scene.add( pointLight );

                container_length = truckJsonObj.container_length;
                container_width = truckJsonObj.container_width;
                container_height = truckJsonObj.container_height;
                var cube_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( container_width, container_height, container_length, 1,1,1 ), 
                    new THREE.MeshBasicMaterial( { color:0xefb73e, wireframe:true } )
                );
                cube_1.position.x = 0;
                cube_1.position.y = 0;
                cube_1.position.z = 0;
                scene.add( cube_1 );

                truck_head_length = 145;
                var truck_head_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( 200, 100, truck_head_length, 1, 1, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_1.position.x = 0;
                truck_head_1.position.y = -50;
                truck_head_1.position.z = -(container_length/2 + truck_head_length/2);
                scene.add( truck_head_1 );
                
                truck_head_length_2 = 80;
                var truck_head_2 = new THREE.Mesh(
                    new THREE.BoxGeometry( 170, 60, truck_head_length_2, 1, 0, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_2.position.x = 0;
                truck_head_2.position.y = 30;
                truck_head_2.position.z = -(container_length/2 + truck_head_length_2/2);
                scene.add( truck_head_2 );
                
                truck_head_chimney_radius = 7;
                var truck_head_chimney1 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney1.position.x = 100;
                truck_head_chimney1.position.y = 50;
                truck_head_chimney1.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney1 );
                
                var truck_head_chimney2 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney2.position.x = -100;
                truck_head_chimney2.position.y = 50;
                truck_head_chimney2.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney2 );
        
                var truck_wheel_1 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_1.position.x = 110;
                truck_wheel_1.position.y = -100;
                truck_wheel_1.position.z = -(container_length/2 + truck_head_length_2/2 + 20) ;
                truck_wheel_1.rotation.x = 0;
                truck_wheel_1.rotation.y = 0;
                truck_wheel_1.rotation.z = 1.6;
                scene.add( truck_wheel_1 );
                
                var truck_wheel_2 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_2.position.x = -110;
                truck_wheel_2.position.y = -100;
                truck_wheel_2.position.z = -(container_length/2 + truck_head_length_2/2 + 20);
                truck_wheel_2.rotation.x = 0;
                truck_wheel_2.rotation.y = 0;
                truck_wheel_2.rotation.z = 1.6;
                scene.add( truck_wheel_2 );

                offset_2 = -240;
                var truck_wheel_5 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_5.position.x = container_width/2 + 5;
                truck_wheel_5.position.y = -100;
                truck_wheel_5.position.z = (container_length/2 + truck_head_length_2/2 + offset_2) ;
                truck_wheel_5.rotation.x = 0;
                truck_wheel_5.rotation.y = 0;
                truck_wheel_5.rotation.z = 1.6;
                scene.add( truck_wheel_5 );

                var truck_wheel_6 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_6.position.x = -container_width/2 - 5;
                truck_wheel_6.position.y = -100;
                truck_wheel_6.position.z = (container_length/2 + truck_head_length_2/2 + offset_2);
                truck_wheel_6.rotation.x = 0;
                truck_wheel_6.rotation.y = 0;
                truck_wheel_6.rotation.z = 1.6;
                scene.add( truck_wheel_6 );

                for (var i in objectArray) {
                    if (objectArray[i].type==2) {
						var cylinderTopR = objectArray[i].length / 2;
						var cylinderHeight = objectArray[i].height;
						if (objectArray[i].place == 1 || objectArray[i].place == 2)
						{
							cylinderHeight = objectArray[i].width;
						}
						
                        var object2 = new THREE.Mesh(
						    new THREE.CylinderGeometry(cylinderTopR, cylinderTopR, cylinderHeight, 60),
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object2.position.x = objectArray[i].x;
                        object2.position.y = objectArray[i].y;
                        object2.position.z = objectArray[i].z;
                        if (objectArray[i].place==1) {
                            object2.rotation.z = 55;
                        }
                        if (objectArray[i].place==2) {
                            object2.rotation.x = 55;
                        }
                        object2.width = objectArray[i].width;
                        object2.height = objectArray[i].height;
                        object2.length = objectArray[i].length;
                        object2.weight = objectArray[i].weight;
                        object2.platform = objectArray[i].platform;
                        object2.order = objectArray[i].order;
                        object2.materialInfo = objectArray[i].material;
                        object2.boxId = objectArray[i].boxId;
                        object2.type = objectArray[i].type;
                        object2.place = objectArray[i].place;
                        scene.add( object2 );
                        objects.push( object2 );
                    }
                    if (objectArray[i].type==1) {
						if (objectArray[i].place == 200)
						{
							var box_length = objectArray[i].width;
                            var box_width = objectArray[i].length;
						}
						else
						{
							var box_length = objectArray[i].length;
							var box_width = objectArray[i].width;
						}
						var box_height = objectArray[i].height;
                        var object = new THREE.Mesh(
                            new THREE.BoxGeometry( box_width, box_height, box_length, 1, 1, 1 ), 
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object.position.x = objectArray[i].x;
                        object.position.y = objectArray[i].y;
                        object.position.z = objectArray[i].z;
						object.length = objectArray[i].length;
						object.width = objectArray[i].width;
						object.height = objectArray[i].height;
                        object.weight = objectArray[i].weight;
                        object.platform = objectArray[i].platform;
                        object.order = objectArray[i].order;
                        object.materialInfo = objectArray[i].material;
                        object.boxId = objectArray[i].boxId;
                        object.type = objectArray[i].type;
                        object.place = objectArray[i].place;
                        scene.add( object );
                        objects.push( object );
                    }
                }

                plane = new THREE.Mesh(
                    new THREE.PlaneGeometry( 2000, 2000, 8, 8 ),
                    new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.25, transparent: true, wireframe: true } )
                );
                plane.visible = true;
                scene.add( plane );
                projector = new THREE.Projector();
                renderer = new THREE.WebGLRenderer( { antialias: true } );
                renderer.sortObjects = false;
                renderer.setSize( window.innerWidth, window.innerHeight );
                renderer.shadowMapEnabled = true;
                renderer.shadowMapType = THREE.PCFShadowMap;
                container.appendChild( renderer.domElement );

                stats = new Stats();
                stats.domElement.style.position = 'absolute';
                stats.domElement.style.top = '0px';
                container.appendChild( stats.domElement );

                window.addEventListener( 'resize', onWindowResize, false );
                renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
                renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );
                renderer.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );
            }

            function onDocumentMouseMove( event ) {
                event.preventDefault();
                mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
                mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    if ( INTERSECTED != intersects[ 0 ].object ) {
                        INTERSECTED = intersects[ 0 ].object;
                        plane.position.copy( INTERSECTED.position );
                        plane.lookAt( camera.position );
                    }
                    container.style.cursor = 'pointer';
                } else {
                    container.style.cursor = 'auto';
                }
            }

            function onDocumentMouseDown( event ) {
                event.preventDefault();
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    controls.enabled = false;  
                    SELECTED = intersects[ 0 ].object;
                    var info = '<B>' + 
                        'boxId: ' + SELECTED.boxId +
                        '</br> x: ' + SELECTED.position.x + 
                        '</br> y: ' + SELECTED.position.y + 
                        '</br> z: ' + SELECTED.position.z + 
                        '</br> width: ' + SELECTED.width + 
                        '</br> height: ' + SELECTED.height + 
                        '</br> length: ' + SELECTED.length + 
                        '</br> weight: ' + SELECTED.weight +
                        '</br> platform: ' + SELECTED.platform +
                        '</br> order: ' + SELECTED.order +
                        '</br> material: ' + SELECTED.materialInfo + 
                        '</br> type: ' + SELECTED.type + 
                        '</br> place: ' + SELECTED.place + 
                        '</B>' +
                        '</br>' + 
                        '--------------------------' + 
                        '</br>' +
                        'type(1:箱体 2:圆柱体)' +
                        '</br>' +
                        'place(1:品字型 2:田字型)';
                    $("#objectInfo").html(info);
                }
            }

            function onDocumentMouseUp( event ) {
                event.preventDefault();
                controls.enabled = true;
                if ( INTERSECTED ) {
                    plane.position.copy( INTERSECTED.position );
                    SELECTED = null;
                }
                container.style.cursor = 'auto';
            }

            function onWindowResize() {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize( window.innerWidth, window.innerHeight );
            }

            function animate() {
                requestAnimationFrame( animate );
                render();
                stats.update();
            }

            function render() {
                controls.update();
                renderer.render( scene, camera );
            }

        </script>
        <div id="objectInfo" class="a2"><br/>点击物体获取相关属性</div>
        <style>
            .a2{position:absolute; left:20px; top:50px; bottom:0px; width:180px; height:250px; z-index:9999; background: #00FFFF; font-weight:bold; }
        </style>
    </body>
</html>